/*
 * To change this template, choose Tools | Templates
 * and open the template in the editor.
 */
package cz.muni.fi.PA165.musiclibrarybackend.entities;

import java.io.Serializable;
import javax.persistence.*;

/**
 *
 * @author kubi
 */
@Entity
@Table(name="username")
public class User implements Serializable {
    private static final long serialVersionUID = 1L;


    @Id
    @Column(name="user_name")
    private String name;
    
    @Column(name="user_password")
    private String password;
    
    @Column(name="user_admin")
    private Boolean admin;
    
    
    

    
    
    public String getName() {
        return name;
    }

    public void setName(String name) {
        this.name = name;
    }

    public String getPassword() {
        return password;
    }

    public void setPassword(String password) {
        this.password = password;
    }

    public Boolean getAdmin() {
        return admin;
    }

    public void setAdmin(Boolean admin) {
        this.admin = admin;
    }

    @Override
    public int hashCode() {
        int hash = 3;
        hash = 67 * hash + (this.name != null ? this.name.hashCode() : 0);
        return hash;
    }

    @Override
    public boolean equals(Object obj) {
        if (obj == null) {
            return false;
        }
        if (getClass() != obj.getClass()) {
            return false;
        }
        final User other = (User) obj;
        if ((this.name == null) ? (other.name != null) : !this.name.equals(other.name)) {
            return false;
        }
        return true;
    }

    @Override
    public String toString() {
        return "User{" + "name=" + name + ", password=" + password + ", admin=" + admin + '}';
    }
    
    



   
    
}
